package com.chuji.crmcj.act;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.alibaba.fastjson.JSON;
import com.android.volley.Request;
import com.android.volley.Response;
import com.android.volley.VolleyError;
import com.android.volley.toolbox.StringRequest;
import com.bumptech.glide.Glide;
import com.chuji.crmcj.R;
import com.chuji.crmcj.bean.AgreeOrderInfo;
import com.chuji.crmcj.bean.MagClientLoseDetailInfo;
import com.chuji.crmcj.bean.SaleNoticeDatailInfo;
import com.chuji.crmcj.utils.CommonUtil;
import com.chuji.crmcj.utils.SPUtils;
import com.chuji.crmcj.utils.UIUtils;
import com.chuji.crmcj.utils.UrlUtils;
import com.chuji.crmcj.utils.VolleyUtil;
import java.util.ArrayList;
import java.util.List;

public class NoticeDetailActivity extends Activity {
    /*回退*/
    private ImageView mIv_Back;
    //头像
    private com.chuji.crmcj.view.CircleImageView mIv_client_image;
    //姓名
    private TextView mTv_name;
    //职位
    private TextView mTv_post;
    //通知标题
    private TextView mTv_notice_title;
    //通知时间
    private TextView mTv_notice_time;
    //通知内容
    private TextView mTv_notice_content;
    //数据存储
    List<SaleNoticeDatailInfo.ApiParamObjEntity> saleNoticeDatailData;
    //网络数据
    private SaleNoticeDatailInfo saleNoticeDatailInfo;
    //意图
    Intent intent;
    //消息ID
    String MessageID;
    //用户ID
    String UserID;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_notice_detail);
        mIv_Back= (ImageView) findViewById(R.id.iv_Back);
        mIv_client_image = (com.chuji.crmcj.view.CircleImageView) findViewById(R.id.iv_client_image);
        mTv_name = (TextView) findViewById(R.id.tv_name);
        mTv_post = (TextView) findViewById(R.id.tv_post);
        mTv_notice_title = (TextView) findViewById(R.id.tv_notice_title);
        mTv_notice_time = (TextView) findViewById(R.id.tv_notice_time);
        mTv_notice_content = (TextView) findViewById(R.id.tv_notice_content);
        //回退
        mIv_Back.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                finish();
            }
        });
    }
    //获取传过来的数据
    public void getData(){
        //数据
        intent=getIntent();
        Glide.with(UIUtils.getContext())
                .load(UrlUtils.ImageIP +intent.getStringExtra("avatar"))
                .into(mIv_client_image);
        mTv_name.setText(intent.getStringExtra("name"));
        mTv_post.setText(intent.getStringExtra("post"));
        mTv_notice_title.setText(intent.getStringExtra("title"));
        mTv_notice_time.setText(intent.getStringExtra("time"));
        mTv_notice_content.setText(intent.getStringExtra("content"));
    }
}
